﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class SpecialMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.Special>
    {
        public SpecialMap()
        {
            // table
            //ToTable("CMS_Special");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.SpecialName)
                
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.SpecialNameEN)
                .IsUnicode(false)
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.ParentId)
                
                .IsRequired();
            Property(t => t.OrderId)
                
                .IsRequired();
            Property(t => t.LinkUrl)
                
                .HasMaxLength(300)
                .IsOptional();
            Property(t => t.Path)
                .IsUnicode(false)
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.DomainName)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.ContentAdmin)
                
                .HasMaxLength(1000)
                .IsOptional();
            Property(t => t.SpecialAdmin)
                
                .HasMaxLength(1000)
                .IsOptional();
            Property(t => t.SpecialFilePostfix)
                
                .HasMaxLength(10)
                .IsOptional();
            Property(t => t.SpecialFilePrefix)
                
                .HasMaxLength(10)
                .IsOptional();
            Property(t => t.SpecialURLStyle)
                
                .IsRequired();
            Property(t => t.SpecialIntro)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.SpecialPic)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.SpecialDescription)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.SpecialKeyWord)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.OpenGrade)
                
                .IsRequired();
            Property(t => t.SpeciaURLFormat)
                .IsUnicode(false)
                .HasMaxLength(255)
                .IsOptional();
         
            Property(t => t.TemplateFileName)
                
                .HasMaxLength(255)
                .IsOptional();

            // Relationships

            //InitializeMapping();
        }
    }
}

